/*----------------------------------------------------------
* FILE: EdSugeridaCorreoDetId.java
* LOGICAL NAME: EdSugeridaCorreoDetId
* PRODUCT: jsiit-model
*----------------------------------------------------------
* IMPORTANT NOTICE
* This program is property of DAI ( Development Alternatives Inc )
* Its unauthorized use, as any code alteration without authorization 
* is prohibited
*----------------------------------------------------------
* MODIFICATIONS
* DATE 12/07/2010
* AUTHOR nalopez
*----------------------------------------------------------
*/

package sv.gob.mh.dgii.model;

import java.io.Serializable;

import javax.persistence.Column;

/**
 * @author TPAR
 * <b>Created by </b>nalopez
 * <b>for</b>jsiit-model
 * <b>on</b> 12/07/2010 14:52:11
 * <b>Purpose</b> 
 * <p>
 * </p>
 */
public class EdSugeridaCorreoDetId implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7419992229435042663L;
	
	private Long isugeridaCorreo;
	private Long icorrelativo;

	/**
	 * 
	 */
	public EdSugeridaCorreoDetId() {
	}
	
	public EdSugeridaCorreoDetId(Long isugeridaCorreo, Long icorrelativo) {
		this.isugeridaCorreo = isugeridaCorreo;
		this.icorrelativo = icorrelativo;
	}

	@Column(name = "I_SUGERIDA_CORREO", nullable = false, precision = 18, scale = 0)
	public Long getIsugeridaCorreo() {
		return isugeridaCorreo;
	}

	public void setIsugeridaCorreo(Long isugeridaCorreo) {
		this.isugeridaCorreo = isugeridaCorreo;
	}

	@Column(name = "I_CORRELATIVO", nullable = false, precision = 18, scale = 0)
	public Long getIcorrelativo() {
		return icorrelativo;
	}

	public void setIcorrelativo(Long icorrelativo) {
		this.icorrelativo = icorrelativo;
	}
	
	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof EdSugeridaCorreoDetId))
			return false;
		EdSugeridaCorreoDetId castOther = (EdSugeridaCorreoDetId) other;
		return ((this.getIsugeridaCorreo() == castOther.getIsugeridaCorreo()) || (this
				.getIsugeridaCorreo() != null
				&& castOther.getIsugeridaCorreo() != null && this.getIsugeridaCorreo()
				.equals(castOther.getIsugeridaCorreo())))
				&& ((this.getIcorrelativo() == castOther.getIcorrelativo()) || (this
						.getIcorrelativo() != null
						&& castOther.getIcorrelativo() != null && this
						.getIcorrelativo().equals(castOther.getIcorrelativo())));
	}

	public int hashCode() {
		int result = 17;
		result = 37 * result
				+ (getIsugeridaCorreo() == null ? 0 : this.getIsugeridaCorreo().hashCode());
		result = 37 * result
				+ (getIcorrelativo() == null ? 0 : this.getIcorrelativo().hashCode());
		return result;
	}

}
